package cn.tedu.egarticle0811.base.config;

import cn.tedu.egarticle0811.base.Interceptor.LonginInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class InterceptorConfig implements WebMvcConfigurer {
    public void addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry){
        registry.addInterceptor(new LonginInterceptor())
                .addPathPatterns("/v1/**").excludePathPatterns("/v1/user/login");
    }
}
